package com.pan.tools;


import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.stereotype.Component;

@Component
public class MD5Tools {
    public static String md5(String s){
        return DigestUtils.md5Hex(s);
    }
    public static String fromPassToDBPass(String password,String salt){
        password = salt.charAt(0)+salt.charAt(5)+password+salt.charAt(2)+salt.charAt(1);
        String dbPassword = md5(password);
        return dbPassword;
    }
}
